3.329 \(\int \cot ^5(e+f x) (a+b \sec ^2(e+f x))^2 \, dx\)

Optimal. Leaf size=51 \[ \frac {a^2 \log (\sin (e+f x))}{f}-\frac {(a+b)^2 \csc ^4(e+f x)}{4 f}+\frac {a (a+b) \csc ^2(e+f x)}{f} \]

[Out]

a*(a+b)*csc(f*x+e)^2/f-1/4*(a+b)^2*csc(f*x+e)^4/f+a^2*ln(sin(f*x+e))/f

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4138, 444, 43} \[ \frac {a^2 \log (\sin (e+f x))}{f}-\frac {(a+b)^2 \csc ^4(e+f x)}{4 f}+\frac {a (a+b) \csc ^2(e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^5*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

(a*(a + b)*Csc[e + f*x]^2)/f - ((a + b)^2*Csc[e + f*x]^4)/(4*f) + (a^2*Log[Sin[e + f*x]])/f

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 444

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && EqQ[m
- n + 1, 0]

Rule 4138

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, -Dist[(f*ff^(m + n*p - 1))^(-1), Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*
(ff*x)^n)^p)/x^(m + n*p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rubi steps

\begin {align*} \int \cot ^5(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {x \left (b+a x^2\right )^2}{\left (1-x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {(b+a x)^2}{(1-x)^3} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac {\operatorname {Subst}\left (\int \left (-\frac {(a+b)^2}{(-1+x)^3}-\frac {2 a (a+b)}{(-1+x)^2}-\frac {a^2}{-1+x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=\frac {a (a+b) \csc ^2(e+f x)}{f}-\frac {(a+b)^2 \csc ^4(e+f x)}{4 f}+\frac {a^2 \log (\sin (e+f x))}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.25, size = 77, normalized size = 1.51 \[ -\frac {\left (a \cos ^2(e+f x)+b\right )^2 \left (-4 a^2 \log (\sin (e+f x))+(a+b)^2 \csc ^4(e+f x)-4 a (a+b) \csc ^2(e+f x)\right )}{f (a \cos (2 (e+f x))+a+2 b)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^5*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

-(((b + a*Cos[e + f*x]^2)^2*(-4*a*(a + b)*Csc[e + f*x]^2 + (a + b)^2*Csc[e + f*x]^4 - 4*a^2*Log[Sin[e + f*x]])
)/(f*(a + 2*b + a*Cos[2*(e + f*x)])^2))

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 97, normalized size = 1.90 \[ -\frac {4 \, {\left (a^{2} + a b\right )} \cos \left (f x + e\right )^{2} - 3 \, a^{2} - 2 \, a b + b^{2} - 4 \, {\left (a^{2} \cos \left (f x + e\right )^{4} - 2 \, a^{2} \cos \left (f x + e\right )^{2} + a^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (f x + e\right )\right )}{4 \, {\left (f \cos \left (f x + e\right )^{4} - 2 \, f \cos \left (f x + e\right )^{2} + f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5*(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

-1/4*(4*(a^2 + a*b)*cos(f*x + e)^2 - 3*a^2 - 2*a*b + b^2 - 4*(a^2*cos(f*x + e)^4 - 2*a^2*cos(f*x + e)^2 + a^2)
*log(1/2*sin(f*x + e)))/(f*cos(f*x + e)^4 - 2*f*cos(f*x + e)^2 + f)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5*(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)2/f*((-32*((1-cos(
f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b^2-64*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b*a-32*((1-cos(f*x+exp(
1)))/(1+cos(f*x+exp(1))))^2*a^2-128*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b^2+256*(1-cos(f*x+exp(1)))/(1+cos
(f*x+exp(1)))*b*a+384*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*a^2)/4096+(-48*((1-cos(f*x+exp(1)))/(1+cos(f*x+e
xp(1))))^2*a^2-4*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b^2+8*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b*a+12*
(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*a^2-b^2-2*b*a-a^2)*1/128/((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2-a
^2/2*ln(abs((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))+1))+a^2/4*ln(abs(1-cos(f*x+exp(1)))/abs(1+cos(f*x+exp(1)))
))

________________________________________________________________________________________

maple [A]  time = 0.84, size = 87, normalized size = 1.71 \[ -\frac {a^{2} \left (\cot ^{4}\left (f x +e \right )\right )}{4 f}+\frac {a^{2} \left (\cot ^{2}\left (f x +e \right )\right )}{2 f}+\frac {a^{2} \ln \left (\sin \left (f x +e \right )\right )}{f}-\frac {a b \left (\cos ^{4}\left (f x +e \right )\right )}{2 f \sin \left (f x +e \right )^{4}}-\frac {b^{2}}{4 f \sin \left (f x +e \right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^5*(a+b*sec(f*x+e)^2)^2,x)

[Out]

-1/4*a^2*cot(f*x+e)^4/f+1/2*a^2*cot(f*x+e)^2/f+a^2*ln(sin(f*x+e))/f-1/2/f*a*b/sin(f*x+e)^4*cos(f*x+e)^4-1/4/f*
b^2/sin(f*x+e)^4

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 61, normalized size = 1.20 \[ \frac {2 \, a^{2} \log \left (\sin \left (f x + e\right )^{2}\right ) + \frac {4 \, {\left (a^{2} + a b\right )} \sin \left (f x + e\right )^{2} - a^{2} - 2 \, a b - b^{2}}{\sin \left (f x + e\right )^{4}}}{4 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5*(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/4*(2*a^2*log(sin(f*x + e)^2) + (4*(a^2 + a*b)*sin(f*x + e)^2 - a^2 - 2*a*b - b^2)/sin(f*x + e)^4)/f

________________________________________________________________________________________

mupad [B]  time = 4.61, size = 83, normalized size = 1.63 \[ \frac {a^2\,\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )}{f}-\frac {\frac {a\,b}{2}+\frac {a^2}{4}+\frac {b^2}{4}-{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {a^2}{2}-\frac {b^2}{2}\right )}{f\,{\mathrm {tan}\left (e+f\,x\right )}^4}-\frac {a^2\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^5*(a + b/cos(e + f*x)^2)^2,x)

[Out]

(a^2*log(tan(e + f*x)))/f - ((a*b)/2 + a^2/4 + b^2/4 - tan(e + f*x)^2*(a^2/2 - b^2/2))/(f*tan(e + f*x)^4) - (a
^2*log(tan(e + f*x)^2 + 1))/(2*f)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \cot ^{5}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**5*(a+b*sec(f*x+e)**2)**2,x)

[Out]

Integral((a + b*sec(e + f*x)**2)**2*cot(e + f*x)**5, x)

________________________________________________________________________________________